package com.kh.samr.entity.plan_project;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.kh.samr.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 计划项目基础信息
 *
 * @author Harry
 * @date 2020/12/29
 */
@ApiModel(description = "计划项目基础信息")
@Table(name = "pp_base_info")
@EqualsAndHashCode(callSuper = true)
@Entity(name = "pp_base_info")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseInfo extends BaseEntity {
	
	private static final long serialVersionUID = -1194038043154176407L;
	
	/**
	 * 计划项目信息标准唯一标识
	 */
	@ApiModelProperty(value = "计划项目信息标准唯一标识", readOnly = true)
	@Column(length = 36)
	private String planProjectStandardId;
	
	/**
	 * 项目唯一标识
	 */
	@ApiModelProperty(value = "项目唯一标识", readOnly = true)
	@Column(length = 100, nullable = false)
	private String originalId;
	
	/**
	 * 项目名称
	 */
	@ApiModelProperty(value = "项目名称", readOnly = true)
	@Column(length = 150, nullable = false)
	private String projectNameCN;
	
	/**
	 * 项目英文名称
	 */
	@ApiModelProperty(value = "项目英文名称", readOnly = true)
	@Column(length = 500, nullable = false)
	private String projectNameEN;
	
	/**
	 * 关键字
	 */
	@ApiModelProperty(value = "关键字", readOnly = true)
	@Column(nullable = false)
	private String keywords;
	
	/**
	 * 计划类别
	 */
	@ApiModelProperty(value = "计划类别", readOnly = true)
	@Column(length = 50, nullable = false)
	private String programType;
	
	/**
	 * 项目类别
	 */
	@ApiModelProperty(value = "项目类别", readOnly = true)
	@Column(length = 50, nullable = false)
	private String projectType;
	
	/**
	 * 项目属性 (是否省部级)
	 */
	@ApiModelProperty(value = "项目属性 (是否省部级)", readOnly = true)
	private boolean projectProperties;
	
	/**
	 * 项目性质
	 */
	@ApiModelProperty(value = "项目性质", readOnly = true)
	@Column(length = 50, nullable = false)
	private String projectProperty;
	
	/**
	 * 活动类型
	 */
	@ApiModelProperty(value = "活动类型", readOnly = true)
	@Column(length = 50, nullable = false)
	private String activityType;
	
	/**
	 * 合同编号
	 */
	@ApiModelProperty(value = "合同编号", readOnly = true)
	@Column(length = 50, nullable = false)
	private String contractNo;
	
	/**
	 * 重点领域/专项领域
	 */
	@ApiModelProperty(value = "重点领域/专项领域", readOnly = true)
	@Column(length = 50, nullable = false)
	private String keyAreas;
	
	/**
	 * 技术领域
	 */
	@ApiModelProperty(value = "技术领域", readOnly = true)
	@Column(length = 50, nullable = false)
	private String technicalField;
	
	/**
	 * 项目主要优势
	 */
	@ApiModelProperty(value = "项目主要优势", readOnly = true)
	@Column(length = 1000, nullable = false)
	private String projectAdvantages;
	
	/**
	 * 技术来源
	 */
	@ApiModelProperty(value = "技术来源", readOnly = true)
	@Column(length = 1000, nullable = false)
	private String technologySource;
	
	/**
	 * 应用产业领域
	 */
	@ApiModelProperty(value = "应用产业领域", readOnly = true)
	@Column(length = 50, nullable = false)
	private String applicationIndustry;
	
	/**
	 * 指南代码名称
	 */
	@ApiModelProperty(value = "指南代码名称", readOnly = true)
	@Column(length = 50, nullable = false)
	private String guideCodeName;
	
	/**
	 * 指南代码代码
	 */
	@ApiModelProperty(value = "指南代码代码", readOnly = true)
	@Column(length = 20, nullable = false)
	private String guideCodeCode;
	
	/**
	 * 所属学科名称
	 */
	@ApiModelProperty(value = "所属学科名称", readOnly = true)
	@Column(length = 50, nullable = false)
	private String subjectName;
	
	/**
	 * 所属学科代码
	 */
	@ApiModelProperty(value = "所属学科代码", readOnly = true)
	@Column(length = 20, nullable = false)
	private String subjectCode;
	
	/**
	 * 相关学科名称
	 */
	@ApiModelProperty(value = "相关学科名称", readOnly = true)
	@Column(length = 50, nullable = false)
	private String relatedSubjectName;
	
	/**
	 * 相关学科代码
	 */
	@ApiModelProperty(value = "相关学科代码", readOnly = true)
	@Column(length = 20, nullable = false)
	private String relatedSubjectCode;
	
	/**
	 * 社会经济目标
	 */
	@ApiModelProperty(value = "社会经济目标", readOnly = true)
	@Column(length = 1000, nullable = false)
	private String socialEconomicAim;
	
	/**
	 * 国际、港澳台合作
	 */
	@ApiModelProperty(value = "国际、港澳台合作", readOnly = true)
	@Column(length = 8, nullable = false)
	private String internationalPartner;
	
	/**
	 * 产品或技术出口
	 */
	@ApiModelProperty(value = "产品或技术出口", readOnly = true)
	@Column(length = 8, nullable = false)
	private String productExport;
	
	/**
	 * 前期科研成果是否获得中央财政科技计划立项支持
	 */
	@ApiModelProperty(value = "前期科研成果是否获得中央财政科技计划立项支持", readOnly = true)
	private boolean isCentralSupport;
	
	/**
	 * 成果形式
	 */
	@ApiModelProperty(value = "成果形式", readOnly = true)
	@Column(length = 50, nullable = false)
	private String achievement;
	
	/**
	 * 优先方向
	 */
	@ApiModelProperty(value = "优先方向", readOnly = true)
	@Column(length = 50, nullable = false)
	private String priority;
	
	/**
	 * 总体目标
	 */
	@ApiModelProperty(value = "总体目标", readOnly = true)
	@Column(length = 200, nullable = false)
	private String objective;
	
	/**
	 * 主要研发内容
	 */
	@ApiModelProperty(value = "主要研发内容", readOnly = true)
	@Column(length = 1000, nullable = false)
	private String items;
	
	/**
	 * 主要创新点
	 */
	@ApiModelProperty(value = "主要创新点", readOnly = true)
	@Column(length = 200, nullable = false)
	private String innovation;
	
	/**
	 * 主要研究特色
	 */
	@ApiModelProperty(value = "主要研究特色", readOnly = true)
	@Column(length = 200, nullable = false)
	private String researchFeatures;
	
	/**
	 * 拟开展研究的内容
	 */
	@ApiModelProperty(value = "拟开展研究的内容", readOnly = true)
	@Column(length = 500, nullable = false)
	private String prepareResearchContent;
	
	/**
	 * 开始年月
	 */
	@ApiModelProperty(value = "开始年月", readOnly = true, example = "yyyy-MM-dd")
	@Temporal(TemporalType.DATE)
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
	@Column(nullable = false)
	private Date startingDate;
	
	/**
	 * 完成年月
	 */
	@ApiModelProperty(value = "完成年月", readOnly = true, example = "yyyy-MM-dd")
	@Temporal(TemporalType.DATE)
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
	@Column(nullable = false)
	private Date finishDate;
	
	/**
	 * 现处阶段
	 */
	@ApiModelProperty(value = "现处阶段", readOnly = true)
	@Column(length = 50, nullable = false)
	private String stage;
	
	/**
	 * 前期资助情况
	 */
	@ApiModelProperty(value = "前期资助情况", readOnly = true)
	@Column(precision = 18, scale = 5)
	private BigDecimal preliminaryFunding;
	
	/**
	 * 项目预算总额
	 */
	@ApiModelProperty(value = "项目预算总额", readOnly = true)
	@Column(precision = 18, scale = 5)
	private BigDecimal totalProjectBudget;
	
}
